package com.os.domain;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

/**
 * @author 风亦未止
 * @date 2023/5/3 15:18
 */
@Data
@Document(indexName = "metadata")
public class MetaData {

    @Id
    private String id;

    @Field(type = FieldType.Keyword)
    private String name;
    @Field(type = FieldType.Integer)
    private int version;
    @Field(type = FieldType.Integer)
    private int size;
    @Field(type = FieldType.Text)
    private String hash;
    @Field(type = FieldType.Date,format = DateFormat.basic_date_time)
    private Date created;
}
